// vue2.x  Vue.component('组件名称', 组件对象)
// vue3.x  createApp() -> app -> app.component('组件名称', 组件对象)

// 插件定义
import Skeleton from './Skeleton'
import Slider from './Slider'
import More from './More'
import Bread from './Bread'
import BreadItem from './Bread/Item'
import InfiniteLoad from './InfiniteLoad'
import City from './City'
import Number from './Number'
import Button from './Button'
import CheckBox from './CheckBox'
import Message from './Message/index.vue'
export default {
  install (app) {
    // app: createApp方法执行完得到的实例对象
    // app身上的方法编写具体的插件逻辑
    console.log('当前实例对象app:', app)
    // 使用app.component方法进行全局组件的注册
    // 以组件对象的name属性作为全局组件的名称 以自身对象作为第二个参数
    app.component(Skeleton.name, Skeleton)
    app.component(Slider.name, Slider)
    app.component(More.name, More)
    app.component(Bread.name, Bread)
    app.component(BreadItem.name, BreadItem)
    app.component(InfiniteLoad.name, InfiniteLoad)
    app.component(City.name, City)
    app.component(Number.name, Number)
    app.component(Button.name, Button)
    app.component(CheckBox.name, CheckBox)
    app.component(Message.name, Message)
  }
}
